package fr.inserm.umr915.vcfserver.bio.samples;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

/** sample bean */
public class Sample
	{
	private String name;
	private String description;
	private File bamFile;
	private List<File> vcfs=new ArrayList<File>();
	
	public Sample()
		{
		}
	
	public String getName()
		{
		return name;
		}
	public void setName(String name) {
		this.name = name;
		}
	public String getDescription()
		{
		return description==null?name:description;
		}
	
	public void setDescription(String description) {
		this.description = description;
		}
	
	public File getBamFile()
		{
		return bamFile;
		}
	
	public void setBamFile(File bamFile)
		{
		this.bamFile = bamFile;
		}
	
	public List<File> getVcfs()
		{
		return vcfs;
		}
	
	public void setVcfs(List<File> vcfs)
		{
		this.vcfs = vcfs;
		}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj)
		{
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Sample other = (Sample) obj;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		return true;
		}
	
	@Override
	public String toString()
		{
		return String.valueOf(getName());
		}
	}
